<div class="p-20 backendplugin">
    <div class="p-r p-b-12">
        <p>Album Name</p>
        <div class="p-r">
            <input type="text"  class="w-i b-0xdd h-24" 
                id="albu_alias" name="albu_alias"
                />
        </div>
    </div>
    <div class="clear"></div>
    
    <div id="album_images_BKP">
        <div class="t-a-c fontend_album classic_album" style="text-align: center;"></div>
    </div>
    <div class="mceContentBody ">
        <div id="choosefilefromserverBKP" class="pluginbutton grid_1 h-g-1 b-r-10 t-a-c c-s-p m-r-20" style="border: 4px dotted #55ea55;line-height: 40px;font-size: 30px;font-family: arial;color:#55ea55"
        onclick="BrowseServerCallBack(addAlbumItemBKP)"
        >+</div>
        <div id="choosefilefromserverBKP" class="pluginbutton grid_1 h-g-1 b-r-10 t-a-c c-s-p" style="border: 4px dotted #00CBFF;line-height: 40px;font-size: 30px;font-family: arial;color:#00CBFF"
        onclick="mceInsertContentBKP(addAlbumItemBKP)"
        >&check;</div>
    </div>
</div>
<script>
    function addAlbumItemBKP(url){
        if(url!=undefined && url!=""){
            var src=base_url+ '0x4D/' +url,
                thumb=base_url+'0x4D/0x00/'+url;
            if(url.indexOf('0x00')==0) thumb=base_url+'0x4D/'+url;
            $('#album_images_BKP .fontend_album').append('\
                <a href="'+src+'">\
                    <img class="h-g-2 p-2 b-d-c-ccc m-r-4 m-b-4" data-big="' + src + '" data-description="My description" src="' + thumb + '"/>\
                </a>\
            ');
        }
    }
    function mceInsertContentBKP(){
        var albumcontent='<p>&nbsp;</p>'+$('#album_images_BKP').html()+'<p>&nbsp;</p>';
        tinyMCE.activeEditor.execCommand('mceInsertContent', false,albumcontent );
        $('#frm_backend_album').dialog('close');
        
    }
</script>